<?php
namespace tjsd\view;

/**
 * Container to models that are displayed in view.
 * 
 * @author Jakub Tesárek <info@tjsd.cz>
 * @copyright 2012
 * @version 1.0
 */
interface ViewContainer extends \ArrayAccess {
	
	/**
	 * Retrieves a value based on key from container
	 * 
	 * @param string $key		identifier of item
	 * @return mixed				value stored in container or null if nothing found
	 */
	public function get($key);
	
	/**
	 * Add item to container based on key.
	 * 
	 * If value with the same key allready exists it overided.
	 * 
	 * @param string $key		identifier of item
	 * @param string $value		value to be stored
	 */
	public function add($key, $value);
	
	/**
	 * Removes item from container
	 * 
	 * @param string $key			identifier of item
	 */
	public function remove($key);
	
	/**
	 * Check if is item with given key stored in container
	 * 
	 * @param string $key			identifier of item
	 * @return bool					true if item was found
	 */
	public function contain($key);
}